/**
 * @author 鍚存倍
 * @since 2022/10/13
 * 14:20
 */
package com.windgo.controller.admin;

import com.windgo.bean.MarketFeedback;
import com.windgo.bean.MarketFootprint;
import com.windgo.bean.common.BasePageInfo;
import com.windgo.bean.common.BaseRespVo;
import com.windgo.bean.common.CommonData;
import com.windgo.service.FeedbackService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin/feedback")
public class FeedbackController {
    @Autowired
    FeedbackService feedbackService;
   /* @RequestMapping("list")
    public BaseRespVo list(BasePageInfo basePageInfo,Integer id){
        CommonData<MarketFeedback> data = feedbackService.list(basePageInfo, id);
        return BaseRespVo.ok(data);
    }

    */
    @RequestMapping(value = "list")
    @RequiresPermissions("perms[admin:feedback:list]")
    public BaseRespVo list(BasePageInfo basePageInfo,Integer id,String username){
        // System.out.println("1");
        CommonData<MarketFeedback> data = feedbackService.search(basePageInfo, id, username);
        return BaseRespVo.ok(data);
    }
}
